class Transform2D extends Transform {
  vec2 scale;
  num rotation;
  vec2 translation;
  
  Transform2D() {
    scale = new vec2.one();
    rotation = 0;
    translation = new vec2.zero();
  }
  
  void update(mat4 parent) {
    final s = new mat4.scaling(scale.x, scale.y, 1);
    final r = new mat4.rotationZ(rotation);
    final t = new mat4.translation(translation.x, translation.y, 0);
    _matrix = parent * t * r * s;
  }
}